import Vue from 'vue'
// import VueRouter from 'vue-router'
import vi18n from 'vue-i18n'

import langSet from '@/lang/index.js'

import eleLocale from 'element-ui/lib/locale'

Vue.use(vi18n)
export default 
    ({app,store})=>{
        app.i18n=new vi18n({
            //从客户端中store中传递至到这里改变lang
            locale:store.state.user.lang,
            ...langSet
        })

       eleLocale.i18n((key,value)=>{app.i18n.t(key,value)})
    }
